package com.csst.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.csst.bean.Order;
import com.csst.dao.OrderDAO;


@Repository
public class OrderDAOImpl extends DAOSupport<Order> implements OrderDAO {
	@SuppressWarnings("unchecked")
	@Transactional(readOnly=true,propagation=Propagation.NOT_SUPPORTED)
	public Order getOrder(Order order) {
		List<Order> list=template.findByExample(order);
		if(list.size()>0){
			return list.get(0);
		}
		return null;
	}


}
